//  初始化 state
const state = {

    /**
     * Oauth2授权地址
     */
    oauthAuthorizeUrl : process.env.VUE_APP_OAUTH_AUTHORIZATION_URL,

    /**
     * 网站名称
     */
    websiteName : 'CjLgb 管理系统',

    /**
     * 网站Logo
     */
    websiteLogo : 'https://cjlgb-design-oauth.cdn.bcebos.com/logo_1594289153431.png',

    /**
     * 菜单折叠状态
     */
    collapsed : false,

    /**
     * 加载中
     */
    loading : false,

};

const getters = {
    getOauthAuthorizeUrl : state => state.oauthAuthorizeUrl,
    getWebsiteName : state => state.websiteName,
    getWebsiteLogo : state => state.websiteLogo,
    getCollapsed : state => state.collapsed,
    getLoading : state => state.loading
};

const mutations = {
    updateCollapsed : state => state.collapsed = !state.collapsed,
    setLoading : (state,isLoading) => state.loading = isLoading,
};

const actions = {

};

export default {
    state : state,
    getters : getters,
    mutations : mutations,
    actions : actions
};
